﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using LeadThing.AbpZeroTemplate.Articles.Dtos;
using LeadThing.AbpZeroTemplate.Dto;

namespace LeadThing.AbpZeroTemplate.Articles
{
    /// <summary>
    /// 文章服务接口
    /// </summary>
    public interface IArticleAppService : IApplicationService
    {
        #region 文章管理

        /// <summary>
        /// 根据查询条件获取文章分页列表
        /// </summary>
        Task<PagedResultDto<ArticleListDto>> GetPagedArticlesAsync(GetArticleInput input);

        /// <summary>
        /// 通过Id获取文章信息进行编辑或修改 
        /// </summary>
        Task<GetArticleForEditOutput> GetArticleForEditAsync(NullableIdDto<long> input);

        /// <summary>
        /// 通过指定id获取文章ListDto信息
        /// </summary>
        Task<ArticleListDto> GetArticleByIdAsync(EntityDto<long> input);



        /// <summary>
        /// 新增或更改文章
        /// </summary>
        Task CreateOrUpdateArticleAsync(CreateOrUpdateArticleInput input);





        /// <summary>
        /// 新增文章
        /// </summary>
        Task<ArticleEditDto> CreateArticleAsync(ArticleEditDto input);

        /// <summary>
        /// 更新文章
        /// </summary>
        Task UpdateArticleAsync(ArticleEditDto input);

        /// <summary>
        /// 删除文章
        /// </summary>
        Task DeleteArticleAsync(EntityDto<long> input);

        /// <summary>
        /// 批量删除文章
        /// </summary>
        Task BatchDeleteArticleAsync(List<long> input);

        #endregion

        #region Excel导出功能



        /// <summary>
        /// 获取文章信息转换为Excel
        /// </summary>
        /// <returns></returns>
        Task<FileDto> GetArticleToExcel();

        #endregion

        #region APP

        /// <summary>
        /// 根据查询条件获取文章分页列表
        /// </summary>
        Task<PagedResultDto<ArticleAPPListDto>> GetPagedArticlesAPPAsync(GetArticleAPPInput input);

        /// <summary>
        /// 通过Id获取文章信息进行编辑或修改 
        /// </summary>
        Task<ArticleAPPEditDto> GetArticleForEditAPPAsync(EntityDto<string> input);

        #endregion

    }
}
